package club.caihappy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Created by 百岁 on 2021/9/9
 **/
@Controller
public class ModelTest1 {
    @RequestMapping(path="/m1/t1")
    public String test1(HttpServletRequest request, HttpServletResponse response, Model model){
        model.addAttribute("msg","helloeveryone");
//        HttpSession session = request.getSession();
//        System.out.println(session.getId());
        return "redirect:/index.jsp";
//        return "forward:/WEB-INF/jsp/hello.jsp";
    }
}
